Reource = function() {
	return {
		insert : function() {
			var date1 = new Date();
			$.ajax({
				url		:	basePath + "/mobile/resource/insert.htm",
				type	:	'POST',
				data	:	{
					"usercode"         : "15956909259",
					"caterReg"         : "40051000",
					"caterServ"        : "10020600",
					"caterName"        : "测试添加商户",
					"caterStore"       : "测试添加商户",
					"shortName"        : "测试添加商户",
					"caterMobile"      : "0551-88707594",
					"caterDetailAdd"   : "安徽省合肥市蜀山区合作化南路",
					"caterBusi"        : "地铁1号线苹果园站",
					"caterBuild"       : "火车站",
					"caterZip"         : "230088",
					"caterTime"        : "07:00-24:00",
					"caterTransit"     : "4路、5路、10路",
					"caterDesc"        : "火车站向北200米",
					"caterAtmo"        : "",
					"caterReco"        : "测试",
					"caterMerIntr"     : "测试",
					"caterbiaoqian"    : "",
					"caterDish"        : "测试",
					"caterPark"        : "有",
					"caterLevel"       : "高档",
					"caterSwingCard"   : "是",
					"caterArea"        : "100-300",
					"caterRoom"        : "有",
					"caterBigRoom"     : "50",
					"caterSmallRoom"   : "2",
					"caterSeatCap"     : "500",
					"caterAccReser"    : "是",
					"caterDeliServ"    : "外送服务",
					"caterInfoMainte"  : "信息维护",
					"x"                : "116.17818",
					"y"                : "39.925469999999898",
					"mobilePayment"    : "是",
					"proFlag"          : "1"
				},
				dataType:	'JSON',
				async	:	false,
				success :	function(data) {
					var date2 = new Date();
					alert("新增耗时 : " + (date2.getTime() - date1.getTime()) + "ms");
					alert(data);
					var json = $.parseJSON(data);
					if(json.status == '1') {
						alert("商户信息上报成功");
					} else {
						alert("商户信息上报失败");
					}
				}
			});
		},
		
		
		update : function() {
			var date1 = new Date();
			$.ajax({
				url		:	basePath + "/mobile/resource/update.htm",
				type	:	'POST',
				data	:	{
					"usercode"         : "15956909259",
					"shopId"           : "212102214527",
					"caterReg"         : "11000700",
					"caterServ"        : "20012300",
					"caterName"        : "燃气壁挂炉采暖体验馆",
					"caterStore"       : "",
					"shortName"        : "",
					"caterMobile"      : "0551-65137618 0551-65111999 0551-65111938",
					"caterDetailAdd"   : "合肥市蜀山区龙河路与合作化南路交口东北角",
					"caterBusi"        : "南七；金寨路、合作化路、望江路；市三院、商业大厦、高速开元大酒店",
					"caterBuild"       : "建筑",
					"caterZip"         : "",
					"caterTime"        : "9:00-18:00",
					"caterTransit"     : "",
					"caterDesc"        : "合肥市蜀山区龙河路与合作化南路交口东北角",
					"caterAtmo"        : "朋友聚餐 家庭聚餐",
					"caterReco"        : "3星",
					"caterMerIntr"     : "简介",
					"caterbiaoqian"    : "搬家",
					"caterDish"        : "",
					"caterPark"        : "有",
					"caterLevel"       : "高档",
					"caterSwingCard"   : "是",
					"caterArea"        : "100-300",
					"caterRoom"        : "有",
					"caterBigRoom"     : "",
					"caterSmallRoom"   : "",
					"caterSeatCap"     : "",
					"caterAccReser"    : "是",
					"caterDeliServ"    : "服务",
					"caterInfoMainte"  : "维护",
					"x"                : "",
					"y"                : "",
					"mobilePayment"    : "",
					"proFlag"          : "0"
				},
				dataType:	'JSON',
				async	:	false,
				success :	function(data) {
					var date2 = new Date();
					alert("更新耗时 : " + (date2.getTime() - date1.getTime()) + "ms");
					alert(data);
					var json = $.parseJSON(data);
					if(json.status == '1') {
						alert("商户信息更新成功");
					} else {
						var resultList = eval(json.result);
						for(var i = 0;i < resultList.length; i++) {
							alert(resultList[i].message);
						}
						alert("商户信息更新失败");
					}
				}
			});
		},
		
		detial : function() {
			var date1 = new Date();
			$.ajax({
				url		:	basePath + "/mobile/resource/detail.htm",
				type	:	'POST',
				data	:	{
					"pid"       : "",
					"vt"        : "1",
					"pt"        : "2",
					"ip"        : "221.179.197.61",
					"uci"       : "",
					"m"         : "15956909259",
					"ua"        : "NokiaN+95",
					"ui"        : "",
					"ls"        : "",
					"ii"        : "101000727269",
					"Zip"       : ""
				},
				dataType:	'JSON',
				async	:	false,
				success :	function(data) {
					var date2 = new Date();
					alert("查看详情耗时 : " + (date2.getTime() - date1.getTime()) + "ms");
					alert(data);
					alert("查看详情成功");
				}
			});
		},
		
		search : function() {
			var date1 = new Date();
			$.ajax({
				url		:	basePath + "/mobile/resource/search.htm",
				type	:	'POST',
				data	:	{
					"pid"          : "test",
					"vt"           : "5",
					"pt"           : "2",
					"ip"           : "",
					"uci"          : "",
					"m"            : "18756068416",
					"ua"           : "u9200",
					"ui"           : "",
					"ls"           : "",
					"q"            : "",
					"pn"           : "1",
					"ps"           : "7",
					"lpi"          : "21",
					"lci"          : "",
					"lti"          : "",
					"x"            : "117.250801",
					"y"            : "31.85175",
					"lbb"          : "500",
					"discount"     : "",
					"DiscountRate" : "",
					"address"      : "",
					"customize"    : "1",
					"Zip"          : ""
				},
				dataType:	'JSON',
				async	:	false,
				success :	function(data) {
					var date2 = new Date();
					alert("搜索商户耗时 : " + (date2.getTime() - date1.getTime()) + "ms");
					alert(data);
					alert("搜索商户成功");
				}
			});
		},
		
		readNews : function() {
			Ict.openWin('测试新闻', 820, 420, "/mobile/news/read.htm?type=0&messageId=402881e4407d408e01407d42c6d00002&usercode=18756068416");
		}
		
	};
}();